package models

import "gorm.io/gorm"

type SysMenu struct {
	gorm.Model
	ParentId      uint   `gorm:"column:parent_id;type:int(11);" json:"parent_id"`
	Name          string `gorm:"column:name;type:varchar(100);" json:"name"`
	Icon          string `gorm:"column:icon;type:varchar(100);" json:"icon"`
	Path          string `gorm:"column:path;type:varchar(255);" json:"path"`
	Sort          uint   `gorm:"column:sort;type:int(11);default:0;" json:"sort"`
	Level         uint   `gorm:"column:level;type:tinyint(1);default:0;" json:"level"`
	ComponentName string `gorm:"column:component_name;type:varchar(100);" json:"component_name"`
}

func (table *SysMenu) TableName() string {
	return "sys_menu"
}
